package Q1;

import java.util.HashMap;

public class Test {
    public static void main(String[] args){
        judgeArray(new int[]{1,2,3,4,5});
        judgeArray(new int[]{1,2,1,4,5});
    }

    public static void judgeArray(int[] arr){
        HashMap<Integer,Integer> map = new HashMap<>();
        for(int n:arr){
            if(map.containsKey(n)){
                System.out.println("NO");
                return;
            }
            map.put(n,1);
        }
        System.out.println("YES");
    }
}
